package com.henry.position;

public class PositionDemo {
    public static void main(String[] args) {
        Position[] positions;
        positions = new Position[3];

        positions[0] = new Position(1, 3);
        positions[1] = new Position(2, 3);
        double scalar = 2.3;
        positions[2] = new Position(positions[1]);
        positions[2].scale(scalar);

        for (int i = 0; i < 3; ++i) {
            System.out.print("Position #" + i + ": " + positions[i]);
            System.out.print(" Distance between " + i + " and " + (i+1)%3 + " is: ");
            System.out.print(positions[i].distance(positions[(i+1)%3]) + "\n");
        }

        positions[0].move(1, 2);

        Position a = new Position(positions[0]);
        Position b = new Position(positions[1]);
        Position c = new Position(positions[2]);

        System.out.println("a: " + a);
        System.out.println("b: " + b);
        System.out.println("c: " + c);
    }
}
